package com.sync.syncmasterdata.product.repository.oa;

import com.sync.syncmasterdata.product.entity.oa.ProductWorkflowEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;
import java.util.List;

/**
 * 更新oa流程产品编码字段用
 */

@Repository
public interface UpdateChanpinbmRepository extends JpaRepository<ProductWorkflowEntity, String> {

    @Transactional
    @Modifying(clearAutomatically = true)
    @Query(nativeQuery = true, value="update formtable_main_322_dt1 dt1 set dt1.cunhuobm=?2  where dt1.id=?1")
    void updateProductWF(Integer id,  String cunhuobm);
}
